package com.xiegang.servicedriveruser.service;

import com.xiegang.internalcommon.dto.ResponseResult;
import com.xiegang.servicedriveruser.mapper.DriverUserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author xieGang
 * @description
 * @date 2023/4/9 16:25
 **/

@Service
public class CityDriverUserService {

    @Autowired
    private DriverUserMapper driverUserMapper;

    public ResponseResult isAvailableDriver(String cityCode){

        int count = driverUserMapper.selectDriverUserCountByCityCode(cityCode);

        if (count>0) {
            return ResponseResult.success(true);
        }
        return ResponseResult.success(false);
    }
}
